package com.weiqiao.mall.service;

import com.weiqiao.mall.domain.DistributeEntity;
import com.weiqiao.mall.service.vo.DistributeVO;

/**
 * 分销设置业务层
 *
 * @author
 */
public interface IDistributeService {

    /**
     * 查询设置
     *
     * @param company_id
     * @return
     */
    DistributeEntity findOne(int company_id);

    /**
     * 更新设置
     *
     * @param distributeVO
     * @return
     */
    boolean updateDistribute(DistributeVO distributeVO);

    /**
     * 根据分销设置获取商品佣金总额
     *
     * @param company_id
     * @param profit_percent 利润比
     * @param amount         商品金额
     * @return
     */
    double getCommission(int company_id, double profit_percent, double amount);

    void upgradeMember(int user_id, int company_id);
}
